<?php
	class ui{
	 	var $db_object = NULL;
		
		function ui($object){
			$this->db_object = $object;
		}
		
		function dropdown($table_name, $id, $name, $dropdown_name, $default_value = ""){
			$dropdown = "<SELECT id='{$id}' name='{$name}' >";
			$result = $this->db_object->find_where("district","District_ID,Name", "ORDER BY name ASC");
			while($row = mysql_fetch_assoc($result)){
				$dropdown .= "<OPTION value='{$row[$id]}'>{$row[$name]}</OPTION>";
			}//end while
			$dropdown .= "</SELECT>";
			return $dropdown;
		}//end dropdown
	}
?>